Skip to main content
Feedback

Quick Start

Use this section to quickly modify pre-defined Cloud API Management Local templates for your specific use case.

Localize your Developer Portal

Your Developer Portal can be easily internationalized, either by Cloud API Management or with client-provided translations.

  1. All hard-coded strings should be passed through the translate() method. Pass in the ID for the current view, and a unique ID (within the view) for the string itself.

    // templates.js
    portal.setDefault('mypage', function (data) {
    return `
    <h1>${portal.translate('mypage', 'title')}</h1>
    <p>${portal.translate('mypage', 'greeting')}</p>`;
    });
  2. Pass an object of default values into the addTranslations() method for that view.

    portal.addTranslations('default', {
    'mypage': {
    title: 'Hello, world!',
    greeting: 'How are you today?'
    }
    });

Right-to-Left Languages

Right-to-Left (RTL) languages, such as Arabic, are supported for Developer Portal pages.

Configure your Developer Portal Pages

Configuration for the default pages of your Developer Portal are handled through Configuration Manager.

On this Page